﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Lesson.Alesson" %>
<input type="hidden" name="lid" value="0" id="lid" />
<div class="common">
	<div class="submenunew">
		<div class="submenu_l">
				<div class="unsub">
					<div class="unsubsel">
					<a href="/teaching/"><span>
				<%if(Page.Request.RawUrl.ToLower().IndexOf("/teaching/")>-1){%>
					<strong><%=GetText("M0036")%></strong></span></a></div>
					<div><img src="/Images/submenu_arrow.gif" /></div>
				<%} else{%>
					<%=GetText("M0036")%></span></a></div>
					<div><img src="/Images/submenu_arrownone.gif" /></div>
				<%}%>
				</div>
				<div class="unsub">
					<div class="unsubsel">
					<a href="/course/"><span>
				<%if(Page.Request.RawUrl.ToLower().IndexOf("/course/")>-1){%>
					<strong><%=GetText("M0037")%></strong></span></a></div>
					<div><img src="/Images/submenu_arrow.gif" /></div>
				<%} else{%>
					<%=GetText("M0037")%></span></a></div>
					<div><img src="/Images/submenu_arrownone.gif" /></div>
				<%}%>
				</div>
				<div class="unsub">
					<div class="unsubsel">
					<a href="/teach/join.htm"><span>
				<%if(Page.Request.RawUrl.ToLower().IndexOf("/teach/join.htm")>-1){%>
					<strong><%=GetText("TP100")%></strong></span></a></div>
					<div><img src="/Images/submenu_arrow.gif" /></div>
				<%} else{%>
					<%=GetText("TP100")%></span></a></div>
					<div><img src="/Images/submenu_arrownone.gif" /></div>
				<%}%>
				</div>
				<div class="cleartm"></div>
		</div>
		<div class="submenu_r"><input id="textKey" type="text" class="common_search" /><a href="#" id="btsearch" class="buttonimg" onclick="Search()" ><img src="/Images/icon_search19.gif" border="0" class="img" /></a></div>
		<div class="cleartm"></div>
	</div>
</div>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1><a href="<%=WWWHost %>/course/<%=cm.CID %>"><%=HttpUtility.HtmlEncode(cm.Title)%></a></h1>
							</div>
							<div class="course_fliter">
									
									<div class="floatl">
										<h3><%=lglist[1] == 0 ? "" : "<a href='" + WWWHost + "/lesson/" + lglist[1] + "'><IMG src='/images/icon_lesson_arrow.gif' border=0></a>"%> Lesson <%=lm.Chapter %>: <%=HttpUtility.HtmlEncode(lm.Title) %> <%=lglist[0] == 0 ? "" : "<a href='" + WWWHost + "/lesson/" + lglist[0]+ "'><img src='/Images/icon_lesson_arrow2.gif' alt='Next' border='0' /></a>"%></h3>
										<p class="text14">For learning: English</p>
										<p>Course level: Beginner - Advanced</p>
										<p>Course Type: General</p>
										<p class="grey12">Teach using: Chinese(Mandarin)</p></div>
									<div class="floatr">
										<%if (cm.MemberNo != memberno){ %>
										<div class="layer_contentA5">
										<p align="center" class="price"><span class="price_num">20</span> ITC / hour</p>
										<%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%> <a href="<%=WWWHost %>/session/addasession.htm?tid=<%=cm.MemberNo %>&cid=<%=cm.CID %>&lid=<%=lm.LID %>" class="specgbtn" title="<%=GetText("Book Lesson")+lm.Chapter+" "+HttpUtility.HtmlEncode(lm.Title) %>"><%}else{ %><a href="#" onclick="NotAffirm()" class="specgbtn" title="<%=GetText("Book Lesson")+lm.Chapter+" "+HttpUtility.HtmlEncode(lm.Title) %>"><%} %>
										<span>&nbsp;&nbsp;&nbsp;Book Lesson&nbsp;&nbsp;&nbsp;</span></a>
										</div>
										<%}else{ %>
										<div class="layer_contentA5">
										<div class="margin5" style="border-bottom:1px #eee solid; padding-bottom:5px; width:auto; text-align:right"><span class="Black12UU"><a href="<%=WWWHost %>/lesson/editlesson-<%=cm.CID %>-<%=lm.LID %>.htm">Edit lesson</a></span></div>
										<div class="margin5" style="border-bottom:1px #eee solid; padding-bottom:5px; width:auto; text-align:right"><span class="Black12UU"><a href="#" onclick="del(<%=cm.Sessions %>)">Delete lesson</a></span></div>
										<div class="margin5" style="border-bottom:1px #eee solid; padding-bottom:5px; width:auto; text-align:right"><span class="Black12UU"><a href="<%=WWWHost %>/lesson/addlesson-<%=cm.CID %>.htm">Add a lesson</a></span></div>
										</div>
										<%} %>
									</div>							
									<div class="clear"></div>
							</div>	
							<div class="submenuN_button">
							</div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<div class="layer_contentA5">
									<div class="card">
										<div class="floatl"><a href="<%=WWWHost %>/<%=cm.MemberNo %>T.htm" title="Aiceseason"><img src='<%=cm.Avatar==""?"/Images/no_pic.gif":cm.Avatar %>' width="50" height="50" alt="<%=HttpUtility.HtmlAttributeEncode(cm.Nickname) %>"/></a></div>
										<div class="floatr"><a href="<%=WWWHost %>/<%=cm.MemberNo %>T.htm"><%=HttpUtility.HtmlEncode(cm.Nickname) %></a>
											<p><span class='status_TEdisplay'>Profesessional</span><p><span class="grey11"><%=GetText("C0102",new string[]{BLF.StaticData.GetCountryText(cm.Nationality)}) %></span></div>
										<div class="cleartm"></div>
									</div>
									<%if (cm.MemberNo != memberno&&memberno!=""){ %><div class="margin5"><a href="#" class="addbtn"  <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$Getmail$('"+cm.MemberNo+"')\"":"onclick=\"NotAffirm()\""%> ><span><%=GetText("Send Message") %></span></a></div><%} %>
								</div>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA">
								<div class="layer_contentA5">
									<p><strong>Course Schedule</strong></p>
									<%if (TimeAvaila != null && TimeAvaila.Count > 0){%>
									<p class="grey12"><%=GetTimezoneText(timezone != "" ? timezone : "0")%></p>
									<ul>
									<% int tle = TimeAvaila.Count; for (int i = 0; i < tle; i++){if (i == 0){%><li><div class="schedule_day"><%=BLF.WWW_User.Users.User.GetWeek(TimeAvaila[i].Week)%></div><div class="schedule_time"><%=TimeAvaila[i].FromTime%>-<%=TimeAvaila[i].ToTime%><%}else if (TimeAvaila[i].Week != TimeAvaila[i - 1].Week && i != tle - 1){ %></div><div class="clear"></div></li>
										<li><div class="schedule_day"><%=BLF.WWW_User.Users.User.GetWeek(TimeAvaila[i].Week)%></div><div class="schedule_time"><%=TimeAvaila[i].FromTime%>-<%=TimeAvaila[i].ToTime%><%}else if (i == tle - 1){ %><%if (TimeAvaila[i].Week == TimeAvaila[i - 1].Week){%><br /><%=TimeAvaila[i].FromTime%>-<%=TimeAvaila[i].ToTime%></div></li><%}else { %></div><div class="clear"></div></li>
										<li><div class="schedule_day"><%=BLF.WWW_User.Users.User.GetWeek(TimeAvaila[i].Week)%></div><div class="schedule_time"><%=TimeAvaila[i].FromTime%>-<%=TimeAvaila[i].ToTime%></div><div class="clear"></div></li><%}} %><%else if (TimeAvaila[i].Week == TimeAvaila[i - 1].Week){%><br /><%=TimeAvaila[i].FromTime%>-<%=TimeAvaila[i].ToTime%><%} %>
										<%} %>

									</ul>
									<div class="clear"></div>
									<%} %>
								</div>
							</div>
						</div>
						<!--div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=cm.Nickname %>'s courses</h4>
								<div class="layer_contentA5">
									<ul class="common_rightline">
									<asp:Repeater ID="repcour" runat="server">
									<ItemTemplate>
										<li><a href="<%=WWWHost %>/course/<%#Eval("CID") %>"><%#Eval("Title")%></a></li>
									</ItemTemplate>	
									</asp:Repeater>
									</ul>
									<div><a href="<%=WWWHost %>/<%=cm.MemberNo %>/courses.htm">More courses</a></div>
								</div>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4>Related English lessons</h4>
								<div class="layer_contentA5">
									<ul class="common_rightline">
									<asp:Repeater ID="repless2" runat="server">
									<ItemTemplate>
										<li><a href="<%=WWWHost %>/lesson/<%#Eval("LID") %>"><%#Eval("Title")%></a></li>
									</ItemTemplate>	
									</asp:Repeater>
									</ul>
								</div>
							</div>
						</div-->
					</div>
					<div class="Center9001Right">
						<div class="center9001content">
							<div class="teach_area">
									<div class="courses_col">
										<div class="spectitle2">
											<div class="floatl"><%=GetText("Lesson length: ") %><%=GetText("{0} hour", new string[] { ((float)lm.LongTime/2).ToString()})%></div>
											<div class="floatr"></div>
											<div class="clear"></div>
										</div>
										<div><%=EncodeMessage(lm.Desc) %></div>
										<p><img src="/Images/icon_common_flag.gif" align="absmiddle" /> <a href="#" title="<%=GetText("PB010")%>" onclick="$Feedback$()" >Report Concern</a></p>
									</div>
									<div class="courses_col">
										<h3 class="spectitleT">Lessons</h3>
										<div>
											<ul class="lesson_ul">
											<%foreach (Model.WWW_User.Teach.LessonModel lemd in lmlist1 ){%>
											   <li <%=(lemd.Chapter == lm.Chapter) ? "class='rightlesson_ul'":""%>><%=(lemd.Chapter == lm.Chapter) ? "<strong>" : "<a href='" + WWWHost + "/lesson/" + lemd.LID + "'>"%> Lesson <%=lemd.Chapter + ": " + HttpUtility.HtmlEncode(lemd.Title)%><%=(lemd.Chapter == lm.Chapter) ? "</strong>" : "</a>"%></li>
											   <%} %>
											</ul>									
										</div>
									</div>
									<div class="courses_col">
										<h3 class="spectitleT">Details</h3>
										<div class="course_detail">
											<p>Tags: <%foreach(string tag in taglist){ %><a href="<%=WWWHost %>/course/tag/<%=HttpUtility.UrlEncode(tag) %>.htm"><%=HttpUtility.HtmlEncode(tag)%></a>&nbsp;&nbsp;<%} %></p> 
											<p>Sessions: <%=cm.Sessions == 0 ? cm.Sessions +" session":"<a href='"+WWWHost +"/lesson/"+lm.LID+"/sessions-1.htm'>"+cm.Sessions +" sessions</a>" %></p>
											<p>Copyright:<%=cm.License %></p>
											<p>Views: <%=cm.Views %></p>
										</div>
									</div>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>

<script>
var TP017="<%=GetText("TP017") %>";
var TP018="<%=GetText("TP018") %>";
var TP019="<%=GetText("TP019") %>";
var TP020="<%=GetText("TP020") %>";
var TP021="<%=GetText("TP021") %>";
var TP022="<%=GetText("TP022") %>";
var TP023="<%=GetText("TP023") %>";
var cid=<%=cm.CID %>;
var lid=<%=lid %>;
function del(rc)
{
    showProgressBar(false,true);
    $("$divIput$").style.display = "none";
    var title="";
    var body="";
    if(rc>0)
    {
         title="Alert";
         body="<div class='Popup_button'><input type='button' value=' close this window ' id='addCancelButton' class='buttong' onclick='$EndMessageBox$()'/></div>";
    }
    else
    {
        title="Are you sure?";
        body="<div class='Popup_button'><input type='button' value=\"yes, I'm sure\" id='addOkButton' class='button' onclick=\"SuDelete()\" />&nbsp;&nbsp;<input type='button' value='Cancel' id='addCancelButton' class='buttong' onclick='$EndMessageBox$()'/></div>"; 
    }
    var obj = {}
    $ShowMessageBox$(title,body,obj,$EndMessageBox$,300);
}
function SuDelete()
{
     $("lid").value=lid;
    $("Form1").action = "/course/"+cid;
    $("Form1").submit();
    $EndMessageBox$();               
}
function Schedule()
{
$GetTime$('<%=cm.MemberNo %>','<%=timezone %>');
//var title='<%=GetText("CourseSchedule") %>';
//    showProgressBar(false,true);
//    $("$divIput$").style.display = "none";    
//    var body=$("TimeAvailability").innerHTML;
//    var obj = {}
//    $ShowMessageBox$(title,body,obj,$EndMessageBox$,300);
}
</script>
